package com.isoft.c2team3service2.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.isoft.c2team3service2.entity.Head;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface HeadMapper extends BaseMapper<Head> {
    @Select("select photourl from tb_head where email= #{email};")
    String upLode(String email);

    @Select("select photourl from tb_head where user_id= #{user_id};")
    String selectHead(@Param("user_id") Integer userId);

    @Update("update tb_head set photourl=#{file} where email=#{email};")
    Integer updateHead(String file, String email);
}
